Skip to content

Supports minItems / maxItems #872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 15, 2022

Conversation

kgtkr
Copy link
Contributor

@kgtkr kgtkr commented Feb 1, 2022

fix #871

@changeset-bot
Copy link

changeset-bot bot commented Feb 1, 2022

⚠️ No Changeset found

Latest commit: b7a41fb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@kgtkr kgtkr force-pushed the 871-support-minItems-maxItems branch from a4b87a4 to b7a41fb Compare February 1, 2022 08:40
@@ -150,6 +151,34 @@ describe("SchemaObject", () => {
);
});

it("array (supportArrayLength)", () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome tests!

Copy link
Contributor

@drwpow drwpow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you!

@codecov
Copy link

codecov bot commented Feb 13, 2022

Codecov Report

Merging #872 (1009944) into main (c0eef5f) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #872   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines            1         1           
=========================================
  Hits             1         1           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb5e199...1009944. Read the comment docs.

Copy link
Contributor

@drwpow drwpow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m in favor of merging this, but on second thought, I’d like to see the following added:

  • There’s no documentation in the README, nor the --help flag on how to use this new feature. How would a user use this? When would they want to use this?
  • There are no tests in the CLI to test if this flag is working (there are good TypeScript tests, but we’re not checking the --support-array-length flag is passed correctly)

Could you address both of the following?

@kgtkr kgtkr force-pushed the 871-support-minItems-maxItems branch from b7a41fb to 80a7dcd Compare February 15, 2022 08:38
@kgtkr kgtkr force-pushed the 871-support-minItems-maxItems branch from 80a7dcd to 71c3af6 Compare February 15, 2022 08:44
@kgtkr
Copy link
Contributor Author

kgtkr commented Feb 15, 2022

Thanks. I added a test.
The difference between with and without the option is, for example, test/v3/expected/github.support-array-length.ts:16633.

@drwpow drwpow merged commit cf9cfb7 into openapi-ts:main Feb 15, 2022
@drwpow
Copy link
Contributor

drwpow commented Feb 15, 2022

@all-contributors please add @kgtkr for code, docs

@allcontributors
Copy link
Contributor

@drwpow

I've put up a pull request to add @kgtkr! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Supports minItems / maxItems
2 participants